/**
 * https://leetcode.cn/problems/maximum-product-of-three-numbers/
 */
 function maximumProduct(nums: number[]): number {
    let ans = 0;
    nums.sort((a, b) => b - a)
    for (let i = 0; i < nums.length; i++) {
        ans *= nums[i]
        if (i === 2) return ans
    }
    return ans
};